<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /* 
            模板字符串
                可以解析变量
                可以换行
                可以调用函数
        */

        let name = "jack"
        let str1 = `my name is ${name}`;
        console.log(str1);
        let obj = {
            name: "jack"
        }
        let str2 = `my name is ${obj.name}`;
        console.log(str2);

        function ok() {
            return "my name is jack"
        }
        let str3 = `${ok()}`;
        console.log(str3);
    </script>
</body>

</html>